﻿#region Usings
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
#endregion

namespace NetScrum.Model.Entities
{
    public class Project
    {
        /// <summary>
        /// Project id
        /// </summary>
        public int Id { get; private set; }
        
        /// <summary>
        /// Project's name
        /// </summary>
        public string Name { get; private set; }

        /// <summary>
        /// Project's short description
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Project's designated Product Owner
        /// </summary>
        public User ProductOwner { get; private set; }

        /// <summary>
        /// Project's designated Scrum Master
        /// </summary>
        public User ScrumMaster { get; private set; }

        /// <summary>
        /// Placeholder for all Product Backlog Items this project holds
        /// </summary>
        public Backlog ProductBacklog { get; private set; }
        
        /// <summary>
        /// Creates a new Scrum Project
        /// </summary>
        /// <param name="name">New project's name</param>
        /// <param name="productOwner">New project's designated Product Owner</param>
        /// <param name="scrumMaster">New project's designated Scrum Master</param>
        public Project(string name, User productOwner, User scrumMaster)
        {
            this.Name = name;
            this.ProductOwner = productOwner;
            this.ScrumMaster = scrumMaster;
            this.ProductBacklog = new Backlog();
        }        
        
        #region NHibernate's must have
        private Project()
        {            
        }
        #endregion
    }
}
